<div class='form'>
  <% form_for @article,:html=>{:multipart=>true} do |f| %>
    <%= f.error_messages %>

    <p>
      <label for="article─article_type">留言类型</label>
      <%=select("article", "article_type",Article::TYPE,:prompt => "请选择..")%>
    </p>

    <p>
      <label for="article_title">标题</label>
      <%= f.text_field :title %>
    </p>

    <p>
      <label for="article_content">内容</label>
      <%= f.text_area :content,:rows=>10,:cols=>40 %>
    </p>
    <input name="article[user_id]" type="hidden" value="<%=session[:user_id]%>" />
    <p>
      <%= f.submit button_name,:class=>'submit' %>
    </p>
  <% end %>
</div>